<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <title></title>
	    <#include "/common/meta.ftl"/>
	    <!--[if IE 6]>  
    	<style type="text/css">
	       html{
	         overflow-x:hidden;
	       }
     	</style>
		<![endif]-->
 		<!--[if gte IE 6]>
  		<style type="text/css">
		   body{
		     overflow-x:hidden;
		   }
 		</style>
 		<![endif]-->
 		<script>
 			$(function(){
 				$("#contentIframe").height($(window).height()-45);
 				$(window).resize(function() {
					$("#contentIframe").height($(window).height()-45);
				});
 				<#list thirdLevelMenuList as x >
 					<#if x_index==0>
 					var url = "${x.APPURL!''}";
					url = '${_b}' + url;
 					$("#contentIframe").attr("src" ,  url);
 					</#if>
 				</#list>
 			});
 			function setContentIframe(id,url){
 				$(".nav-tabs > li").removeClass('active');
 				$("#"+id).addClass('active');
 				var src = "";
 				if(url==""){
 					$("#contentIframe").attr("src" , src );
 					return;
 				}else{
					url = '${_b}' + url;
 				}
				if(url.indexOf("?")!=-1){
					src = url+"&id="+id+"&noCache="+Math.random();
				}else{
					src = url+"?id="+id+"&noCache="+Math.random();
				}
				$("#contentIframe").attr("src" , src );
 			}
 		</script>
 	</head>
 	<body>
		<ul class="nav nav-tabs" style="margin-top:2px;margin-left:5px;">
			<#list thirdLevelMenuList as x >
				<#assign hasChildren = '0'>
				<#list fourthLevelMenuList as y>
					<#if y.APPPID == x.APPID>
						<#assign hasChildren = '1'>
						<#break>
					</#if>
				</#list>
			<li id="${x.APPID!''}" class="<#if x_index==0>active</#if>">
				<#if hasChildren == '0'>
					<a href="javascript: setContentIframe('${x.APPID!''}','${x.APPURL!''}');" >${x.APPNAME!''}</a>
				<#else>
					<a href="javascript: void(0);" class="dropdown-toggle" data-toggle="dropdown">${x.APPNAME!''} <span class="caret"></span></a>
					<ul class="dropdown-menu" >
					<#list fourthLevelMenuList as y>
						<#if y.APPPID == x.APPID>
			            <li>
			              <a href="javascript: setContentIframe('${x.APPID!''}','${y.APPURL!''}');" tabindex="-1" >${y.APPNAME!''}</a>
			            </li>
		            	</#if>
		          </#list> 
		          </ul>
				</#if>
				
			</li>
			</#list>
		</ul>
		<iframe id="contentIframe" name="contentIframe" src="" width="100%" border=0 frameborder=0></iframe>
 	</body>
 </html>